Skip to content

custom schema system#56

Merged
ctate merged 17 commits intomainfrom
ctate/add-spec-schema
Feb 5, 2026
Merged

custom schema system#56
ctate merged 17 commits intomainfrom
ctate/add-spec-schema

Conversation

@ctate
Copy link
Copy Markdown
Collaborator

@ctate ctate commented Feb 5, 2026

No description provided.

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Feb 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
json-render Ready Ready Preview, Comment Feb 5, 2026 9:58am

Resolved conflicts in:
- apps/web/app/api/generate/route.ts: Keep playgroundCatalog import
- apps/web/components/playground.tsx: Use Spec type from @json-render/core
@socket-security
Copy link
Copy Markdown

socket-security bot commented Feb 5, 2026

- Test generateSystemPrompt with components, actions, custom rules
- Test new defineCatalog API from schema system
- Test catalog.prompt() method with custom rules
- Test catalog.validate() for valid and invalid specs
- Test catalog.zodSchema() for custom validation
- Test catalog.jsonSchema() for structured outputs
- Add tests for nested specs with children
- Add tests for rejecting invalid component types
Copy link
Copy Markdown
Contributor

@vercel vercel bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additional Suggestions:

  1. Property name mismatch between playground.tsx and useUIStream hook breaks iteration feature - previousTree passed but previousSpec expected.
  1. Rate limiting module fails at runtime when Redis environment variables are not configured, breaking the /api/generate route
Fix on Vercel

Change from children={...} prop to nested children pattern
to satisfy react/no-children-prop rule.
- Disable react/prop-types in both eslint configs (TypeScript handles this)
- Allow styled-jsx 'jsx' property in dashboard
- Add DATABASE_URL to turbo env allowlist
- Remove unused drizzle-orm imports (and, sql)
- Suppress unused variable warnings where intentional
The main package entry includes React components that require
client-side context (React.createContext). This causes build
failures when importing in server-side API routes.

Added `@json-render/remotion/server` entry point that exports
only schema and catalog definitions without React dependencies:
- schema, RemotionSchema, RemotionSpec
- standardComponentDefinitions, standardTransitionDefinitions
- standardEffectDefinitions
- Type exports for catalogs

Updated remotion example to import from /server in catalog.ts
The database connection threw an error at module load time if
DATABASE_URL was not set, causing builds to fail in CI where
the database is not available.

Changed to lazy initialization using a Proxy so the error only
occurs when the database is actually used at runtime, not at
build time.
- Fix property name mismatch: playground now passes previousSpec
  instead of previousTree to match what useUIStream hook expects
- Make rate limiting lazy-initialized to avoid runtime errors when
  Redis env vars (KV_REST_API_URL, KV_REST_API_TOKEN) are not set
- Rate limiting gracefully becomes a no-op when Redis is unavailable
@ctate ctate merged commit c1b1aaa into main Feb 5, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant